home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18332 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  658 b 

  1. Path: unix1.sncc.lsu.edu!eenaya
  2. From: eenaya@unix1.sncc.lsu.edu (Pradeep Nayar)
  3. Newsgroups: comp.lang.c++
  4. Subject: returning null structure
  5. Date: 19 Apr 1996 22:10:22 GMT
  6. Organization: Louisiana State University
  7. Message-ID: <4l930e$uic@sp115.ocs.lsu.edu>
  8. NNTP-Posting-Host: unix1-t.sncc.lsu.edu
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. I have a function which returns an object, how can I return an error condition.
  12. Let me be more specific:  
  13.     I am implementing a stack and in  the pop() fn. I want ot return a null
  14. object or something when the stack is empty.  In case of characters, i can 
  15. return a -1; what do i do when i have a stack of objects?
  16.  
  17. Pradeep
  18.